const express = require( 'express' )
const cors = require( 'cors' )
const bodyParser = require( 'body-parser' )
const stuModel = require( './db/models/stuModel' );


const app = express()
app.listen( 8080 )

// 跨域
app.use( cors() )

// post
app.use( bodyParser.urlencoded( {
  extended: false
} ) )

app.use( bodyParser.json() )

app.use( '/admin', require( './routers/admin' ) )
app.use( '/admin', require( './routers/find' ) )
app.use( '/admin', require( './routers/search' ) )
app.use( '/admin', require( './routers/delete' ) )
app.use( '/admin', require( './routers/put' ) )
app.use( '/admin', require( './routers/recover' ) )
app.use( '/admin', require( './routers/check' ) )
app.use( '/admin', require( './routers/alldel' ) )




